using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Tool.Model;

namespace Tool.Utilty
{
	public class GClass34
	{
		public static GClass27 smethod_0()
		{
			GClass27 gClass = new GClass27();
			string path = GClass28.smethod_0() + "/Config.dll";
			if (!File.Exists(path))
			{
				File.WriteAllText(path, JsonConvert.SerializeObject(gClass));
			}
			else
			{
				string value = File.ReadAllText(path, Encoding.UTF8);
				try
				{
					gClass = JsonConvert.DeserializeObject<GClass27>(value);
				}
				catch
				{
					File.WriteAllText(path, JsonConvert.SerializeObject(gClass));
				}
			}
			return gClass;
		}

		public static List<GClass32> smethod_1()
		{
			List<GClass32> list = new List<GClass32>();
			string path = GClass28.smethod_0() + "/Urls.dll";
			if (!File.Exists(path))
			{
				File.WriteAllText(path, JsonConvert.SerializeObject(list));
			}
			else
			{
				string value = File.ReadAllText(path, Encoding.UTF8);
				try
				{
					list = JsonConvert.DeserializeObject<List<GClass32>>(value);
				}
				catch
				{
					File.WriteAllText(path, JsonConvert.SerializeObject(list));
				}
			}
			return list;
		}

		public static void smethod_2()
		{
			GClass27 value = GClass28.smethod_1();
			string path = GClass28.smethod_0() + "/Config.dll";
			File.WriteAllText(path, JsonConvert.SerializeObject(value));
			List<GClass32> value2 = GClass28.smethod_5();
			string path2 = GClass28.smethod_0() + "/Urls.dll";
			File.WriteAllText(path2, JsonConvert.SerializeObject(value2));
		}
	}
}
